import {axios} from '@/utils/request'

// api接口列表
const api = {
    create: '/pay/channel',
    edit: '/pay/channel/{id}',
    detail: '/pay/channel/{id}',
}

export function add(data) {
    return axios({
        url: api.create,
        method: 'post',
        data
    })
}

export function edit(id, data) {
    return axios({
        url: api.edit.replace('{id}', id),
        method: 'put',
        data
    })
}

export function detail(id, params) {
    return axios({
        url: id ? api.detail.replace('{id}', id) : "/pay/channel",
        method: 'get',
        params
    })
}